<template>
	<view>
		<view class="">
			<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" style="height: 400rpx;">
				<swiper-item v-for="(item,index) in signDetailData.imgs" style="height: 400rpx;">
					<image :src="image+item" mode="" style="height: 400rpx;width: 100%;"></image>
				</swiper-item>
			</swiper>
		</view>
		<view class="bg-white padding-sm">
			<view class="rowsb align-center">
				<view>
					<view>{{signDetailData.title}}</view>
					<view class="text-red margin-top-xs">￥{{signDetailData.price}} <text class="text-gray" style="text-decoration:line-through">￥{{signDetailData.old_price}}</text></view>
				</view>
				<view class="">
					<view>
						{{signDetailData.sale_num}}人付款
					</view>
					
					<view class="margin-top-xs flex justify-end">
						<image src="../../../static/share.png" mode="" style="height: 40rpx;width: 40rpx;"></image>
					</view>
				</view>
			</view>
		</view>
		<view class="padding text-center bg-white margin-top-sm">
			图文详情
		</view>
		<view class="">
			<view style="width: 750rpx;">
				<view style="max-width: 750rpx;" v-html="contentText"></view>
			</view>
			<!-- <rich-text :nodes="signDetailData.content"></rich-text> -->
		</view>
		<view class="bg-white padding text-center " style="position: fixed;z-index: 1;left: 0; right: 0;bottom: 0;"
		 @click="affirmOrder">
				<view class=" padding-sm round  text-white" style="background-color: #0054A7;">
					立即购买
				</view>
		</view>
	</view>
</template>

<script>
	const app = getApp().globalData
	import {
		signData
	} from '../../../common/path.js'
	export default {
		data() {
			return {
				detail: '',
				detail_id: '',
				signDetailData: {},
				image: '',
				contentText: ''
			}
		},
		onLoad(option) {
			this.detail_id = option.id
			this.signData()
			this.image = app.image
		},
		methods: {
			//兑换下单
			affirmOrder() {
				uni.navigateTo({
					url: '../../cart/signAddOrder?id=' + this.detail_id
				})
			},
			//获取详情接口
			signData() {
				let data = {
					id: this.detail_id
				}
				this.$axios.axios('POST', signData, data)
					.then(res => {
						if (res.status == 1) {
							this.signDetailData = res.data
							this.contentText = res.data.content.replace(/\<img/gi,'<img style="width:100%;height:auto;display:inline-block;margin:10rpx auto;"')
						} else {
							this.$tools.showToast(res.msg)
						}
						console.log('获取商品详情接口======>', res.data)
					})
			},
			// ____________________________________________________________________________
			wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}
			
			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);
			
				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {
			
					self.orderPayMen2()
			
				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif
			
							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif
			
							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},wxpayh5Notify() {
				if (uni.getStorageSync('openId') == '') {
					getApp().getCode(this.apiUrl())
				} else {
					this.paymentApi()
				}

			},
			apiUrl() {
				// this.$tools.showToast('获取当前页面路径')
				let pages = getCurrentPages()
				console.log('[当前页地址]', pages);
				let len = pages.length
				let curParam = pages[len - 1].options //获取当前页面参数
				let param = []
				for (let key in curParam) { //获取key=value键值对格式数组
					param.push(key + '=' + curParam[key])
				}
				let _url = '' //除去第一个参数拼接后面参数
				param.forEach((item, i) => {
					if (i != 0) { //拼接&符号，由于第一组前拼接的是？所有第一组需要单独处理
						_url += '&' + item
					}
				})
				let url = '/' + pages[len - 1].route + '?' + param[0] +
					_url //最终格式**/pages/index/index/?id=11&name='boyyang'&sex='man'**
				let href = this.$paths.shareUrl + url
				console.log('[路径]', href);

				return href
			},
			isWeixinMen() {
				let self = this
				var ua = navigator.userAgent.toLowerCase();
				var isWeixin = ua.indexOf('micromessenger') != -1;
				console.log('【微信】', isWeixin);
				if (!isWeixin) {
					this.orderPayMen()
					console.log('非微信');
				} else {

					self.orderPayMen2()

				}
			},
			//支付接口调出支付
			paymentApi() {
				let data = {
					orderno: this.orderno,
					paytype: this.paytype,
					openid: uni.getStorageSync('openId')
				}
				this.$axios.axiosFrom('POST', paymentApi, data)
					.then(res => {
						let that = this
						if (this.paytype == 5) {
							// #ifdef H5
							console.log('[h5wx]', res);
							// #ifdef H5
							window.location.href = 'http://m.yipanxueyuan.com/api/pay/index?orderno=' + this.orderno +
								'&paytype=5'
							// #endif
							// #endif
						} else if (this.paytype == 4) {
							// #ifdef H5
							// this.$tools.showToast(this.orderno)
							console.log('[支付宝支付]', res.data);
							const div = document.createElement('div')
							div.innerHTML = res.data.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
							// #endif
						} else if (this.paytype == 6) {
							this.wxGPay(res.data)
						}
						if (res.code == 1) {
							if (this.paytype == 1) { //支付宝
								// #ifdef APP-PLUS
								this.alipay(res.data.data)
								// #endif

							} else if (this.paytype == 2) { //微信
								// #ifdef APP-PLUS
								this.wechatPay(res.data.data)
								// #endif

							} else if (this.paytype == 7) {
								this.$tools.showToast2(res.msg)
								setTimeout(r => {
									that.nums = 1
									that.isPry = true
								}, 1000)
								console.log('[余额支付]', res);
							}
						} else {
							this.$tools.showToast(res.msg)
						}
					})
			},
			//公众号支付
			wxGPay(res) {
				let that = this
				console.log('[微信公众号支付]', res);
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						appId: res.data.appId, //公众号名称，由商户传入
						timeStamp: res.data.timeStamp, //时间戳
						nonceStr: res.data.nonceStr, //随机串
						package: res.data.package,
						signType: res.data.signType, //微信签名方式：
						paySign: res.data.paySign //微信签名
					},
					function(ress) {
						if (ress.err_msg == 'get_brand_wcpay_request:ok') {
							uni.showToast({
								icon: 'success',
								title: '支付成功'
							});
							setTimeout(r => {
								that.nums = 1
								that.isPry = true
							}, 1000)
						} else if (ress.err_msg == 'get_brand_wcpay_request:cancel') {
							uni.showToast({
								icon: 'none',
								title: "'已取消支付"
							});
						} else {
							// uni.navigateBack({
							// 	delta: 1
							// })
							uni.showToast({
								icon: 'none',
								title: '支付失败'
							});
						}
					}
				)
			},
			//支付宝支付
			alipay(data) {
				let that = this
				uni.requestPayment({
					provider: 'alipay',
					orderInfo: data,
					success: (res) => {
						// console.log('成功==>', res);
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			//微信支付
			wechatPay(data) {
				let that = this
				console.log(data, '微信支付');
				uni.requestPayment({
					provider: 'wxpay',
					orderInfo: data,
					success: (res) => {
						that.$tools.showToast('成功')
						that.nums = 1
						that.isPry = true
					},
					fail: (res) => {
						console.log(res, 'fail');
					}
				})
			},
			// 按住时触发
			inputVoice(evet) {
				console.log('获取到的值1', evet);
				this.isRecord = true
			},
			//搜开时触发
			inputVoiceEnd(event) {
				console.log('我松开了', event);
				this.isRecord = false
			},
			//问题详情
			issueDetailApi() {
				let data = {
					order_id: this.issueId
				}
				this.$axios.axiosFrom('POST', issueDetailApi, data)
					.then((res) => {
						if (res.code == 1) {
							this.issueData = res.data
							this.isLike = res.data.collect_or
						}
						console.log('[问题status]', this.status);
						if (res.data) {
							if (this.isOptionUser) {
								this.isPry = true
								this.nums = 1
							} else {
								if (this.status == 4) {
									this.isPry = true //老师抢单进入
									this.isTeacherUser = true
									this.nums = 5
									console.log('[老师回答问题]');
								} else if (this.status == 5) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 5
								} else if (this.status == 6) {
									this.isPry = true //回答
									this.isTeacherUser = true
									this.nums = 6
								} else {
									if (app.userInfo.id == this.issueData.ms_id || app.userInfo.id == this.issueData
										.testuser_id) { //如果是自己进入话
										this.isTeacherUser = false
										this.nums = 1
										this.isPry = true
										console.log('[自己进入的]');
									} else { //普通用户进入的逻辑处理
										console.log('[222222222222222]');
										if (res.data.weiguan_or == 0) { //如果是普通用户购买完成问题
											this.isPry = false
											this.nums = 2
										} else {
											this.nums = 1
											this.isPry = true
										}
									}
								}
							}
							uni.setNavigationBarTitle({ //设置标题
								title: this.issueData.introduce
							})
							getApp().getSignPackage(
								'艺盘书画',
								this.issueData.introduce,
								this.issueData.images[0],
								1,
								this.issueId
							)
						}
						// console.log('[是否支付了返回状态]', this.isPry);
					})
			},
		}
	}
</script>

<style>
</style>
